package pojo;

/**
 * 用户信息表
 */
public class User {
    private int id; //用户id
    private String username; //昵称
    private String real_name; //真实姓名
    private String password; //密码
    private String phone; //电话
    private String address; //地址
    private boolean admin; //是否为管理员

    public User() {
    }

    public User(String username) {
        this.username = username;
    }

    public User(String username, String real_name, String password, String phone, String address, boolean admin) {
        this.username = username;
        this.real_name = real_name;
        this.password = password;
        this.phone = phone;
        this.address = address;
        this.admin = admin;
    }

    public User(int id, String username, String real_name, String password, String phone, String address, boolean admin) {
        this.id = id;
        this.username = username;
        this.real_name = real_name;
        this.password = password;
        this.phone = phone;
        this.address = address;
        this.admin = admin;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getReal_name() {
        return real_name;
    }

    public void setReal_name(String real_name) {
        this.real_name = real_name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public boolean isAdmin() {
        return admin;
    }

    public void setAdmin(boolean admin) {
        this.admin = admin;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", real_name='" + real_name + '\'' +
                ", password='" + password + '\'' +
                ", phone='" + phone + '\'' +
                ", address='" + address + '\'' +
                ", admin=" + admin +
                '}';
    }
}
